package o;

import android.text.TextUtils;
import androidx.annotation.NonNull;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import o.cof.d;

public class bpc implements bkm {
    private ArrayList<c> mApkFiles;
    private transient coi mListener;
    private String mPkgName;
    private int mVersionCode;

    public static class c implements bkm {
        private String mFile;
        private String mTarget;
        private int mType;
        private String mValue;

        public c(String str, String str2, String str3, int i) {
            this.mFile = str;
            this.mTarget = str2;
            this.mValue = str3;
            this.mType = i;
        }

        public String ˏ() {
            return this.mTarget;
        }

        public String ॱ() {
            return this.mValue;
        }
    }

    public cof ˎ() {
        d dVar = new d();
        dVar.ˊ(1);
        dVar.ˊ(coc.ˏ);
        dVar.ˋ(this.mPkgName);
        dVar.ˏ(this.mVersionCode);
        if (this.mApkFiles != null) {
            Iterator it = this.mApkFiles.iterator();
            while (it.hasNext()) {
                c cVar = (c) it.next();
                dVar.ॱ(cVar.mFile, cVar.mTarget, cVar.mType);
            }
        }
        dVar.ˏ(this.mListener);
        return dVar.ˎ();
    }

    public bpc ˏ(String str) {
        this.mPkgName = str;
        return this;
    }

    public bpc ˊ(int i) {
        this.mVersionCode = i;
        return this;
    }

    public bpc ˋ(String str, String str2, String str3, int i) {
        if (!(TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || TextUtils.isEmpty(str3))) {
            if (this.mApkFiles == null) {
                this.mApkFiles = new ArrayList();
            }
            this.mApkFiles.add(new c(str, str2, str3, i));
        }
        return this;
    }

    public bpc ॱ(coi o_coi) {
        this.mListener = o_coi;
        return this;
    }

    @NonNull
    public List<c> ˋ() {
        return bkz.ˏ(this.mApkFiles);
    }
}
